// NLightProtocol.h: interface for the CNLightProtocol class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_NLIGHTPROTOCOL_H__CD985F59_6112_4FF8_903C_46811388A4F1__INCLUDED_)
#define AFX_NLIGHTPROTOCOL_H__CD985F59_6112_4FF8_903C_46811388A4F1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "LaserProtocol.h"

class CNLightProtocol  : public CLaserProtocol
{
public:
	CNLightProtocol();
	virtual ~CNLightProtocol();

	bool CheckResponseError(CString strResponse);
	bool TestConnection();
	int InitLaser(int iComPort);
	bool WaitLaserControllerToIDle();
	bool WaitLaserControllerToReady();
	bool IsIDle();
	bool IsReady();
	bool IsPowerOn();
	bool SetWidthRate(CString strCurWF,CString& strMaxPower);
	bool SetPower(double dPower);
	bool CheckReceiveData(CString strReceive,CString strCommandData);
	
public:
	bool SetLaserStateToIdle();
	bool GetMaxPower(CString& strReceive);
	bool PowerOff();
	bool PowerOn();
	bool SetReady();
	bool SetIdle();
	bool SendReceiveCheckCommand(CString strCommand);

	ComParam m_SendDCB;
	CString m_strError;
	CString m_strReceive;
};

#endif // !defined(AFX_NLIGHTPROTOCOL_H__CD985F59_6112_4FF8_903C_46811388A4F1__INCLUDED_)
